package com.greenhou.sqlSession.defaults;

import com.greenhou.pojo.Configuration;
import com.greenhou.sqlSession.SqlSession;
import com.greenhou.sqlSession.SqlSessionFactory;
import com.greenhou.sqlSession.defaults.DefaultSqlSession;

public class DefaultSqlSessionFactory implements SqlSessionFactory {
    private Configuration configuration;
    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration=configuration;
    }

    @Override
    public SqlSession openSession(){
        return new DefaultSqlSession(this.configuration);
    }
}
